package com.woniu.service.impl;

import com.woniu.adapter.CustomerAdapter;
import com.woniu.outlet.po.CustomerPo;
import com.woniu.service.CustomerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Slf4j
public class CustomerServiceImpl implements CustomerService {

    @Autowired
    private CustomerAdapter customerAdapter;

    @Override
    public List<CustomerPo> findCustomers() throws Exception {
        List<CustomerPo> customerPos = customerAdapter.findCustomers();
        return customerPos;
    }

    @Override
    public CustomerPo getCustomerById(Long id) throws Exception {
        return customerAdapter.getCustomerById(id);
    }
}
